/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package jesstalk.chatsystem.chatresponse;

import java.util.Date;

/**
 *
 * @author Ecky
 */
public class MessageInfo {
        public boolean  fromSystem;
        public String   window;
        public String   senderName;
        public String   time;
        public long     timeNum;
        public String   content;

        public static MessageInfo createSystemMsg(String content) {
            MessageInfo msg = new MessageInfo();
            msg.timeNum = System.currentTimeMillis();
            msg.fromSystem = true;
            msg.senderName = "System";
            msg.content = content;
            msg.time = new Date().toString();
            msg.window = null;

            return msg;
        }

        public static MessageInfo createChatMsg(String sender, String window, String content) {
            MessageInfo msg = new MessageInfo();
            msg.timeNum = System.currentTimeMillis();
            msg.fromSystem = false;
            msg.senderName = sender;
            msg.content = content;
            msg.time = new Date().toString();
            msg.window = window;

            return msg;
        }
}
